The present invention relates to a computer system, and more particularly to a file format conversion method for a file system which provides a user with information having a plurality of file formats. More specifically, the invention relates to a file format conversion method suitable for a plurality of computers to exchange over the world wide web (hereinafter called WWW) information having a plurality of file formats, and to a file system, various information processing systems, and an electronic commerce system respectively using the file format conversion method.
Prior to describing the related art, some terms will be described.
A computer system uses a xe2x80x9csecondary storage unitxe2x80x9d for preserving data even if the power of the computer is turned off. The secondary storage unit presently used is a hard disk, a floppy disk, a magneto-optical disk, or the like.
A xe2x80x9cfile systemxe2x80x9d is software used for data exchange between a secondary storage unit and an application program (xe2x80x9capplicationxe2x80x9d). The unit of data a file system processes is called a xe2x80x9cfilexe2x80x9d. Generally, a plurality of files are stored in one secondary storage unit, and each file is discriminated by a xe2x80x9cfile namexe2x80x9d. A character string is often used as the file name. A file system is supplied in many cases to a user as part of an operating system (OS), or it is supplied in some cases as a combination of libraries and an OS or only as libraries. For example, software combining a file system supplied by an OS and a library adding an extension function to the file system is called a file system so long as it processes data exchange between a secondary storage unit and an application.
A file operation an application program (application) can perform is defined by an application program interface (API) between the application and file system. An API regarding a file input/output is called a xe2x80x9cfile input/output APIxe2x80x9d. The file input/output API includes an open (preparation for file read/write), a read (transfer of data from a file to an application), a write (transfer of data from an application to a file), and a close (end of file read/write). An API regarding the operation of a file and a directory is called a xe2x80x9cfile management APIxe2x80x9d. The file management API includes file formation, file name change, and file deletion. The file operation which can be realized by the file input/output API and file management API is collectively called a xe2x80x9cfile operationxe2x80x9d.
The data structure of a file is called a xe2x80x9cfile formatxe2x80x9d (or simply xe2x80x9cformatxe2x80x9d). Examples of the format include xe2x80x9carray of character strings partitioned by a line feed characterxe2x80x9d, xe2x80x9carray of items partitioned by a tab characterxe2x80x9d, xe2x80x9cfile format of word processor software Axe2x80x9d, xe2x80x9carray of frames (an image displayed at an instant) of a moving imagexe2x80x9d, and the like. The file format is represented in some cases by using last several characters of a file name. The last several characters of the file name are called an xe2x80x9cextensionxe2x80x9d.
The related art will be described below.
A file presently used by a number of applications (such as a word processor, a spread sheet, a schedule management, an e-mail, and a programming tool) has a format specific to it. A personal computer widely used nowadays utilizes a variety of file formats totalling in number about 200. In the WWW prevailed upon developments of the Internet, not only characters, but also still images, moving images, sound, computer graphics are used with a various kind of file formats.
Generally, not all applications can access all file formats. Therefore, even if a user stores information in a file having a certain file format, the user is often required to perform a xe2x80x9cfile conversionxe2x80x9d for the file in order to enable another application to access the file. A file as an input for the format conversion is called a xe2x80x9cconversion originating filexe2x80x9d, and a file as an output is called a xe2x80x9cconversion destination filexe2x80x9d.
The format conversion requires the tasks of (1) selecting a conversion program (or a combination of conversion programs) for performing a conversion desired by a user, from a number of xe2x80x9cconversion programsxe2x80x9d regarding a various kind of formats, and (2) correctly giving the selected conversion program with a conversion originating file and a conversion destination file and executing the conversion program at a proper timing. These tasks are not relevant to the works of a user performed on an application. It is therefore desired that a format conversion load on the user is reduced as much as possible. As described above, since the utilization of the Internet and WWW are rapidly increasing, there is a high need of processing a variety kind of formats as simply as possible.
The following methods have been proposed heretofore in order to simplify mainly the above task (1).
In JP-A-6-187219, xe2x80x9cAutomatic Data Sharing Method between Programsxe2x80x9d (hereinafter called Prior Art 1), a user designates an application and a file to be used, an applicationxe2x80x94data correspondence table is searched to select a proper conversion program, and the application performs the format conversion necessary for using the file.
The user is therefore released from the task (1), i.e., selecting a conversion program used for accessing the file. However, the task (2), i.e., designating that when the format conversion is performed for what file, is still required to be operated by the user. The reason for this is that a user is required to perform a work of designating and supplying the file to be converted and the application name to the system of Prior Art 1, although this work is not relevant to the essential work of the user to be performed on the application.
In a present computer system including the WWW, one application processes a plurality of file formats, and there are a plurality of applications which process only one file format. Under such circumstances, even if the application and the file name are designated, a particular conversion method cannot be determined. For example, consider the case there are three file formats discriminated by three extensions .tex, .ps, and .pdf and a program A can process .ps and .pdf. In this case, even if a user designates the program A and a file foo.tex, it is not possible to definitely determine whether foo.tex is converted into foo.ps or foo.pdf.
In JP-A-9-69059, xe2x80x9cFile Format Conversion System (hereinafter called Prior Art 2), as a user designates a conversion originating file name and a conversion destination file name (or an application name using a conversion originating file and an application name using a conversion destination file), a conversion program or programs are selected, and the format conversion from the conversion originating file into the conversion destination file is executed. Therefore, the user is released from the task (1), i.e., selecting a conversion program or programs to be used for accessing the file. However, the user is required to perform the task (2), i.e., designating that when the format conversion is performed for what file, and this work load is still imposed upon the user.
As a method of automatically and collectively performing complicated file operation processes, software (hereinafter called Prior Art 3) is known which is described in MAKE Paragraph 1 of the document xe2x80x9c4.4 BSD User""s Reference Manualxe2x80x9d written by University of California, Computer Systems Research Group (O""Reilly and Associates, Inc., 1994). Prior Art 3 discloses a method of simplifying a one-step or multi-step compile operation from a source program to a binary program. Also Prior Art (3) can solve the issue of the task (1), but the issue of the task (2) cannot be solved.
As described above, although there are many proposals, the conventional format conversion method does not consider the load of the task (2) upon a user. The task (2) can be further classified into two sub-tasks. (2-a) A task of designating that which file is used as the conversion originating file and which file is used as the conversion destination file. If this designation is missed, there is a danger that the contents of the conversion destination file become different from those the user desired, and that the contents of another file may be broken. It is necessary to pay attention to that there is a case wherein a conversion destination file is not present before the format conversion. (2-b) A task of designating that when the format conversion is executed. If this designation is missed, there is a danger that an application accesses old information.
Further, the conventional format conversion method has the following problems.
(i) A method of retaining a consistency between a conversion originating file and a conversion destination file is not prepared. There is therefore a risk that a write operation starts generally at the same time for both the conversion originating file and conversion destination file, and the next format conversion makes one of the written files be lost, or other risks.
(ii) Since a number of conversion destination files are stored, an additional secondary storage area may become necessary.
(iii) The format conversion is impossible if the conversion originating file cannot be accessed, (for example, because an application is editing the conversion originating file, because the power of the secondary storage unit storing the conversion originating file is turned off, or because of other reasons).
It is an object of the present invention to solve the problems associated with the tasks (1), (2-a), and (2-b) and the problems (i), (ii), and (iii) and reduce the works of a user utilizing a plurality of file formats as much as possible, in view of the present conditions that a plurality of file formats are used by a plurality of applications.
The problem associated with the task (2-1) results from that there are a number of conversion originating and destination files and a relation among them is not given as yet. Therefore, a user is required to instruct that the format of which file is converted into the format of which file. According to the invention, a file system holds a relation (either one-step or multi-step) among a conversion originating file, a conversion destination file, and a conversion file. With this means, not only the format of a conversion originating file can be converted into the format of a conversion destination file by using only the conversion destination file, but also it is possible to obtain one or more conversion destination files and one or more conversion programs by using only a conversion originating file.
In order to deal with the case wherein a conversion destination file is not present before the file conversion, the file system is provided with a file name conversion method of obtaining the file name of a conversion destination file from the file name of a conversion originating file. The conversion destination file is ordinarily generated as the result of the format conversion. According to the invention, the format conversion can start upon designation of a conversion destination file so that the works of a user can be reduced. Namely, a problem that which one of the format conversion and conversion destination file was first formed cannot be known, can be solved by providing the file name conversion method, so that the conversion destination file can be supplied to a user before the format conversion is performed.
The problem associated with the task (2-b) results from that there is no means for providing a coordination between an application and a format conversion method, i.e., there is no means for the format conversion method to know when and how an application processes which file. Therefore, a user is required heretofore to perform a setup process of the format conversion in addition to the works of the user to be performed on an application. In contrast, according to the invention, the file system sets up and executes a conversion program, by using as a trigger the issue of a file input/output API entered by a user.
With the provision of the above two counter-measures, the format conversion method of the invention can know that which file an application processes and whether the access is a read or write operation. Therefore, a user is required to perform only the essential works of an application, and various format conversions (either one-step or multi-step) which become necessary during the user works can be performed without involving the user in the format conversions. Since the conversion program is executed by using as a trigger the file operation, it is not necessary to designate the timing of the format conversion, and a user can always access the latest conversion destination file.
Furthermore, according to the invention, in order to solve the above problems (i), (ii), and (iii), the following means (I), (II), and (III) are provided.
(I) An exclusive control is performed between an execution of a file input/output API for a conversion originating file and an execution of a file input/output API for a conversion destination file. Namely, while one of them is executed, the other is inhibited to be executed. A consistency between the conversion originating and destination files can therefore be retained.
(II) In order to avoid a wasteful secondary storage area to be caused by storing a number of conversion destination files, conversion destination files are deleted when necessary.
(III) In order to allow the format conversion to be executed while a conversion originating file cannot be accessed, an intermediate file is provided, and a two-step conversion is preformed to convert from a conversion originating file into an intermediate file and convert the intermediate file into a conversion destination file.
The file system receives various operation requests for files, and can realize the file conversion using the issue of a file input/output API as its trigger, and the two-step conversion to convert from a conversion originating file into an intermediate file and convert the intermediate file into a conversion destination file. Furthermore, since the file system is shared by a number of applications, by providing the file system with the file format conversion function of the invention, a number of applications can enjoy the effects of the invention.